package com.tvserials.notification.parser;

import com.tvserials.notification.dto.Episode;
import com.tvserials.notification.dto.Serial;
import com.tvserials.notification.exceptions.NetworkConnectionException;
import com.tvserials.notification.vo.SourceType;
import com.tvserials.notification.vo.TvEpisodeFilterVO;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by Alex on 30.03.2014.
 */
public class MockPageParser extends DefaultPageParser {

    public List<Episode> parse(TvEpisodeFilterVO filterVO) throws NetworkConnectionException {
        ArrayList<Episode> episodes = new ArrayList<Episode>();
        Episode episode = new Episode();
        episode.setChapterName("Test one");
        episode.setShowName(new Serial("Test", SourceType.ALL));
        episode.setReleaseDate(new Date());
        episode.setChapterNumber("01.02");
        episode.setImage(null);
        episode.setChapterDetailsUrl("http://www.lostfilm.tv");

        Episode episode1 = new Episode();
        episode1.setChapterName("Test two");
        episode.setShowName(new Serial("Test 2", SourceType.ALL));
        episode1.setReleaseDate(new Date());
        episode1.setChapterNumber("02.02");
        episode1.setImage(null);
        episode1.setChapterDetailsUrl("http://www.lostfilm.tv");

        episodes.add(episode);
        episodes.add(episode1);
        return episodes;
    }

    @Override
    public List<Serial> parseSerialsList() throws NetworkConnectionException {
        return null;
    }

    @Override
    public SourceType getSourceType() {
        return SourceType.ALL;
    }
}
